using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Leo.Repository.Mapping;
using Leo.Entities;

namespace Leo.Repository
{
    public partial class LeonesContext : DbContext
    {
        static LeonesContext()
        {
            Database.SetInitializer<LeonesContext>(null);
        }

        public LeonesContext()
            : base("Name=LeonesContext")
        {
        }

        public DbSet<ATENCION_PACIENTE> ATENCION_PACIENTE { get; set; }
        public DbSet<Cita> Citas { get; set; }
        public DbSet<Cliente> Clientes { get; set; }
        public DbSet<COMPRA> COMPRAs { get; set; }
        public DbSet<Comprobante> Comprobantes { get; set; }
        public DbSet<DETALLE_COMPRA> DETALLE_COMPRA { get; set; }
        public DbSet<DETALLE_PEDIDO> DETALLE_PEDIDO { get; set; }
        public DbSet<Detalle_Servicio> Detalle_Servicio { get; set; }
        public DbSet<DETALLECOMPROBANTE> DETALLECOMPROBANTEs { get; set; }
        public DbSet<DetalleReceta> DetalleRecetas { get; set; }
        public DbSet<DETALLEVENTA> DETALLEVENTAs { get; set; }
        public DbSet<DUENIO> DUENIOs { get; set; }
        public DbSet<Laboratorio> Laboratorios { get; set; }
        public DbSet<Lote> Lotes { get; set; }
        public DbSet<Paciente> Pacientes { get; set; }
        public DbSet<PRODUCTO> PRODUCTOes { get; set; }
        public DbSet<Proveedor> Proveedors { get; set; }
        public DbSet<Servicio> Servicios { get; set; }
        public DbSet<VENTA> VENTAs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ATENCION_PACIENTEMap());
            modelBuilder.Configurations.Add(new CitaMap());
            modelBuilder.Configurations.Add(new ClienteMap());
            modelBuilder.Configurations.Add(new COMPRAMap());
            modelBuilder.Configurations.Add(new ComprobanteMap());
            modelBuilder.Configurations.Add(new DETALLE_COMPRAMap());
            modelBuilder.Configurations.Add(new DETALLE_PEDIDOMap());
            modelBuilder.Configurations.Add(new Detalle_ServicioMap());
            modelBuilder.Configurations.Add(new DETALLECOMPROBANTEMap());
            modelBuilder.Configurations.Add(new DetalleRecetaMap());
            modelBuilder.Configurations.Add(new DETALLEVENTAMap());
            modelBuilder.Configurations.Add(new DUENIOMap());
            modelBuilder.Configurations.Add(new LaboratorioMap());
            modelBuilder.Configurations.Add(new LoteMap());
            modelBuilder.Configurations.Add(new PacienteMap());
            modelBuilder.Configurations.Add(new PRODUCTOMap());
            modelBuilder.Configurations.Add(new ProveedorMap());
            modelBuilder.Configurations.Add(new ServicioMap());
            modelBuilder.Configurations.Add(new VENTAMap());
        }
    }
}
